/*
 Navicat Premium Dump SQL

 Source Server         : mysql01
 Source Server Type    : MySQL
 Source Server Version : 90200 (9.2.0)
 Source Host           : localhost:3306
 Source Schema         : nest_big_event

 Target Server Type    : MySQL
 Target Server Version : 90200 (9.2.0)
 File Encoding         : 65001

 Date: 03/04/2025 15:16:41
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for article
-- ----------------------------
DROP TABLE IF EXISTS `article`;
CREATE TABLE `article` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title` varchar(30) NOT NULL,
  `content` varchar(10000) NOT NULL,
  `cover_img` varchar(1000) NOT NULL,
  `state` varchar(3) NOT NULL,
  `category_id` int NOT NULL,
  `create_user` int NOT NULL,
  `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
  `categoryIdId` int NOT NULL,
  `createUserId` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `FK_c4e3348c86dfc3bacdd9bc36cad` (`categoryIdId`),
  KEY `FK_3bd873efcfe04f25cd32d6a7612` (`createUserId`),
  CONSTRAINT `FK_3bd873efcfe04f25cd32d6a7612` FOREIGN KEY (`createUserId`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `FK_c4e3348c86dfc3bacdd9bc36cad` FOREIGN KEY (`categoryIdId`) REFERENCES `category` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of article
-- ----------------------------
BEGIN;
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (1, '文章no1修改了', 'this is the content of article no 1', 'https://baidu.com/abc.png', '草稿', 3, 11, '2025-03-31 17:31:41.815658', '2025-03-31 18:14:50.000000', 3, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (5, '文章no1', 'this is the content of article no 1', 'https://baidu.com/abc.png', '已发布', 3, 11, '2025-03-31 17:39:09.037371', '2025-03-31 17:39:09.037371', 3, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (6, '文章no2', 'this is the content of article no 1', 'https://baidu.com/abc.png', '已发布', 3, 11, '2025-03-31 17:39:13.497376', '2025-03-31 17:39:13.497376', 3, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (7, '文章no3', 'this is the content of article no 1', 'https://baidu.com/abc.png', '已发布', 3, 11, '2025-03-31 17:39:20.120489', '2025-03-31 17:39:20.120489', 3, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (9, '文章no5', 'this is the content of article no 1', 'https://baidu.com/abc.png', '草稿', 3, 11, '2025-04-01 17:21:19.809905', '2025-04-01 17:21:19.809905', 3, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (10, '文章no6', 'this is the content of article no 1', 'https://baidu.com/abc.png', '草稿', 3, 11, '2025-04-01 17:21:26.716717', '2025-04-01 17:21:26.716717', 3, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (12, '文章no7', 'this is the content of article no 1', 'https://baidu.com/abc.png', '草稿', 4, 11, '2025-04-01 17:22:16.471094', '2025-04-01 17:22:16.471094', 4, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (13, '文章no8', 'this is the content of article no 1', 'https://baidu.com/abc.png', '已发布', 4, 11, '2025-04-01 17:22:27.548912', '2025-04-01 17:22:27.548912', 4, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (14, '文章no9', 'this is the content of article no 1', 'https://baidu.com/abc.png', '已发布', 4, 11, '2025-04-01 17:22:32.716289', '2025-04-01 17:22:32.716289', 4, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (15, '文章no10', 'this is the content of article no 1', 'https://baidu.com/abc.png', '已发布', 4, 11, '2025-04-01 17:22:36.632422', '2025-04-01 17:22:36.632422', 4, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (16, '文章no11', 'this is the content of article no 1', 'https://baidu.com/abc.png', '已发布', 5, 11, '2025-04-01 17:23:11.107656', '2025-04-01 17:23:11.107656', 5, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (17, '文章no12', 'this is the content of article no 1', 'https://baidu.com/abc.png', '已发布', 5, 11, '2025-04-01 17:23:17.775496', '2025-04-01 17:23:17.775496', 5, 11);
INSERT INTO `article` (`id`, `title`, `content`, `cover_img`, `state`, `category_id`, `create_user`, `create_time`, `update_time`, `categoryIdId`, `createUserId`) VALUES (18, '文章no12', 'this is the content of article no 1', 'https://baidu.com/abc.png', '草稿', 5, 11, '2025-04-01 17:23:23.516894', '2025-04-01 17:23:23.516894', 5, 11);
COMMIT;

-- ----------------------------
-- Table structure for category
-- ----------------------------
DROP TABLE IF EXISTS `category`;
CREATE TABLE `category` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_name` varchar(255) NOT NULL,
  `category_alias` varchar(255) NOT NULL,
  `create_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
  `create_user` int NOT NULL,
  `create_user_id` int NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `IDX_9359e3b1d5e90d7a0fbe3b2807` (`category_name`),
  KEY `FK_8fab369bd77d4a142d32fd5982b` (`create_user_id`),
  CONSTRAINT `FK_8fab369bd77d4a142d32fd5982b` FOREIGN KEY (`create_user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of category
-- ----------------------------
BEGIN;
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_time`, `update_time`, `create_user`, `create_user_id`) VALUES (3, '英语', 'english', '2025-03-31 14:35:07.055111', '2025-03-31 14:35:07.055111', 11, 11);
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_time`, `update_time`, `create_user`, `create_user_id`) VALUES (4, '体育', 'sport', '2025-04-01 17:22:10.993235', '2025-04-01 17:22:10.993235', 11, 11);
INSERT INTO `category` (`id`, `category_name`, `category_alias`, `create_time`, `update_time`, `create_user`, `create_user_id`) VALUES (5, '数学', 'math', '2025-04-01 17:22:57.047205', '2025-04-01 17:22:57.047205', 11, 11);
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
  `id` int NOT NULL AUTO_INCREMENT,
  `username` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `nickname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `user_pic` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `created_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6),
  `update_time` datetime(6) NOT NULL DEFAULT CURRENT_TIMESTAMP(6) ON UPDATE CURRENT_TIMESTAMP(6),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `created_time`, `update_time`) VALUES (10, 'zhaobowen', '$2b$10$L3VhS.OZ5HAm8cR75iq0AeEUMCjfaljPAaqZhHUu4aOYGBu9dTUY2', 'wokao', '234234@qq.com', 'http://www.linlong.com/1.png', '2025-03-28 11:31:03.307649', '2025-03-28 11:31:03.307649');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `created_time`, `update_time`) VALUES (11, 'admin', '$2b$10$c6pUgYCmoKeLGmE8yw4SBOyU0RqGIJMVKhwBrUvTFEIfT1xKwJ1QG', 'wokao', '234234@qq.com', 'http://www.linlong.com/1.png', '2025-03-28 11:34:08.178021', '2025-04-01 18:22:02.000000');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `created_time`, `update_time`) VALUES (13, 'admin1', '$2b$10$Q/LMrJoFATFMdLLPBr2riuxJBjff/IwgeFePHL723hohbRyLM7t3e', NULL, NULL, NULL, '2025-04-03 11:21:17.026803', '2025-04-03 11:21:17.026803');
INSERT INTO `user` (`id`, `username`, `password`, `nickname`, `email`, `user_pic`, `created_time`, `update_time`) VALUES (14, 'admin2', '$2b$10$m.PrrjKlh/evoFpCVwsGyOK83TreuAXLP2jAyIUGwBD03RWGVdVPq', NULL, NULL, NULL, '2025-04-03 11:26:08.710664', '2025-04-03 11:26:08.710664');
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
